<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 创建一个5x5的二维数组
        var size = 5;
        var array = [];
        var num = 1;

        // 填充二维数组
        for (var i = 0; i < size; i++) {
            array[i] = [];
            for (var j = 0; j < size; j++) {
                array[i][j] = num++;
            }
        }

        // 输出左下半三角
        for (var i = 0; i < size; i++) {
            var row = "";
            for (var j = 0; j <= i; j++) {
                row += array[i][j] + " ";
            }
            console.log(row.trim());
        }
    </script>
</body>
</html>
